import com.lyw.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

/**
 * 配置hilt插件
 */
class HiltConventionPlugin: Plugin<Project> {

    override fun apply(target: Project) {
        with(target) {
            plugins.apply("com.google.dagger.hilt.android")
            dependencies{
                add("kapt", libs.findLibrary("hilt.compiler").get())
                add("implementation", libs.findLibrary("hilt.android").get())
                add("implementation", libs.findLibrary("androidx.lifecycle.viewModel.ktx").get())
            }
        }
    }
}